

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

@protocol QRSystemDelegate <NSObject>

- (void)qrCodeComplete:(NSString *)codeString;

- (void)qrCodeError:(NSError *)error;

@end

@interface QRSystemVC : UIViewController<AVCaptureMetadataOutputObjectsDelegate>

@property (copy,nonatomic)NSString *orderid; //订单ID

@property(assign,nonatomic)id<QRSystemDelegate> delegate;

@property (retain,nonatomic)AVCaptureDevice *device;

@property (retain,nonatomic)AVCaptureMetadataOutput *output;

@property (retain,nonatomic)AVCaptureDeviceInput *input;

@property (retain, nonatomic)AVCaptureSession *session;

@property (retain, nonatomic)AVCaptureVideoPreviewLayer *preview;

@end
